package 异常;

import 集合.ArrayList;

import java.util.List;

public class tryCatch3 {
    public static void main(String[] args) {

        try {


            int[] arr = {1, 2, 3};
            System.out.println(arr[3]);
            List a = (List) new ArrayList();
            a.add(1);
            a.add(2);
            a.add(3);
            Object o = a.get(3);
            System.out.println(0);
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            System.out.println(e);
        }
        catch (IndexOutOfBoundsException e)
        {
            System.out.println(e);
        }
        System.out.println("hhh");
    }
}
